package br.edu.unirn.seguranca

class SegurancaFilters {

    def filters = {
        all(controller:'*', action:'*') {
            before = {
				if (!session.usuario && !(controllerName?.equals('autenticacao') || actionName?.equals('inicio') || actionName?.equals('login'))) {
					redirect(controller:"autenticacao",action:"inicio")
					return false
				}
            }
            after = { Map model ->

            }
            afterView = { Exception e ->

            }
        }
    }
}
